package main;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.TreeSet;


public class Main {
	public static void main(String[] args) {		
		/*
		ArrayList<Integer> col1 = new ArrayList<Integer>();
		col1.add(2);
		col1.add(1);
		ArrayList<Integer> col2 = new ArrayList<Integer>();
		col2.add(4);
		col2.add(3);		
		col2.add(5);				
		
		ArrayList list = Query.SELECT("FROM col = {0},{1} WHERE col <= 4",col1,col2);
		*/
				
		
		//Collection list = Query.SELECT("(FROM col = {0}.get(1),{1} WHERE col <= 4 AND col >= 1 SORT DESC).subSet(0,2)",col1,col2);

		ArrayList<String> col1 = new ArrayList<String>();
		col1.add("Konrad");
		col1.add("Tomek");
		
		ArrayList<String> col2 = new ArrayList<String>();
		col2.add("Test");
		col2.add("Konrad");
		col2.add("Test3");
		
		ArrayList<String> col3 = new ArrayList<String>();
		col3.add("Janek");
		col3.add("Ola");
		col3.add("Tomek");
		
		ArrayList list = Query.SELECT("FROM" +
				"(col = {0})," +
				"(col2 = {1})," +
				"(col3= {2})" +
				"WHERE (col AND (col2 OR col3)) OR (col3)",col1,col2,col3);
		
	    for(Object obj : list){
	    	System.out.println(obj);
	    }	
	}

}
